﻿using ServerBase.Config;
using SvGame.Objects;
using static System.Net.Mime.MediaTypeNames;

namespace SvGame.Logic;

public static partial class GameLogic
{
    // 进入房间
    public static void RoomInit(this IRole me)
    {
        var room = me.Room;

        room.RoomInit(me);

        foreach (var npc in room.DictNpc.Values)
        {
            npc.RoomInit(me);
        }

        // todo RoomInit 判断敌人
        //player.RoomInitEnemy();
    }
    public static void RoomInit(this Room room, IRole me)
    {
        foreach (var item in room.Cfg.Inits)
        {
            switch (item)
            {
                //case RoomInitTest:
                //    me.Message("RoomInitTest");
                //    break;
                default:
                    break;
            }
        }
    }

}
